<template>
  <div class="userInfo">
    <div class="titleBar">
      <svg class="icon iconfont" aria-hidden="true" @click="back">
              <use xlink:href="#icon-zuojiantou"></use>
            </svg>
      <span class="title">
        编辑资料
      </span>
    </div>
    <div class="setList">
      <div class="item">
        <span class="opt">
          头像
        </span>
        <div class="right">
          <img src="https://picsum.photos/id/684/600/400" alt="" class="img">
          
          <svg class="icon iconfont" aria-hidden="true">
              <use xlink:href="#icon-youjiantou"></use>
            </svg>
        </div>

      </div>
      <div class="item">
        <span class="opt">
          性别
        </span>
        <div class="right">
          <svg class="icon iconfont" aria-hidden="true">
              <use xlink:href="#icon-youjiantou"></use>
            </svg>
        </div>
      </div>
      <div class="item">
        <span class="opt">
          昵称
        </span>
        <div class="right">
          <svg class="icon iconfont" aria-hidden="true">
              <use xlink:href="#icon-youjiantou"></use>
            </svg>
        </div>
      </div>
      <div class="item">
        <span class="opt">
          简介
        </span>
        <div class="right">
          <svg class="icon iconfont" aria-hidden="true">
              <use xlink:href="#icon-youjiantou"></use>
            </svg>
        </div>
      </div>
      <div class="item">
        <span class="opt">
          所在地
        </span>
        <div class="right">
          <svg class="icon iconfont" aria-hidden="true">
              <use xlink:href="#icon-youjiantou"></use>
            </svg>
        </div>
      </div>
    </div>

  </div>
</template>

<script setup lang='ts'>
import {useRouter} from 'vue-router';
const router=useRouter()
const back=()=>{
  router.back()
}
</script>

<style lang='less' scoped>
@import url('../common/global.less');
.userInfo {
  background-color: @bg-color;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: 2rem;
  box-sizing: border-box;
  align-items: center;

  .titleBar {
    height: 3rem;
    background: #fff;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
    display: grid;
   align-items: center;
   grid-template-columns: 20px auto;
  .iconfont{
   font-size: 1rem;
    grid-column: 1/2;
  }
  .title{
    line-height: 3rem;
    text-align: center;
  }
  }

  .setList {
    width: 100%;
    border-radius: 0.8rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-top: 1rem;

    .item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 1.5rem;

      span {
        text-align: center;
        font-weight: 600;
      }

      .right {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;

        .arrow {
          width: 1rem;
          height: 1rem;
        }
      }

      position: relative;
      height: 3rem;

      .img {
        width: 2rem;
        height: 2rem;
        border-radius: 0.5rem;
      }
    }

    .item::after {
      content: '';
      width: 90%;
      position: absolute;
      height: 1px;
      transform: scale(1, 0.5);
      background: #d7d5d5;
      left: 4%;
      bottom: 0;
    }

  }
}
</style>
